package com.ruoyi.baseData.controller;

import com.ruoyi.baseData.domain.dto.EquipmentLevelDto;
import com.ruoyi.baseData.service.EquipmentLevelService;
import com.ruoyi.common.core.domain.R;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/equipmentLevel")
public class EquipmentLevelController {
    @Autowired
    EquipmentLevelService materialService;

    @PostMapping("/getEquipmentLevelByPage")
    public R export(@RequestBody EquipmentLevelDto materialDto)
    {
        return R.ok(materialService.getEquipmentLevelByPage(materialDto));
    }

    @PostMapping("/addEquipmentLevel")
    public R addTest(@RequestBody EquipmentLevelDto materialDto){
        materialService.addEquipmentLevel(materialDto);
        return R.ok("添加成功");
    }

    @PostMapping("/delEquipmentLevel")
    public R delTest(@RequestBody EquipmentLevelDto materialDto){
        materialService.delEquipmentLevel(materialDto);
        return R.ok("删除成功");
    }

    @PostMapping("/updateEquipmentLevel")
    public R updateTest(@RequestBody EquipmentLevelDto materialDto){
        materialService.updateEquipmentLevel(materialDto);
        return R.ok("锁定成功");
    }
}
